<?php
return [
    'aliases' => [
        '@bower' => '@vendor/bower-asset',
        '@npm' => '@vendor/npm-asset',
    ],
    'vendorPath' => dirname(dirname(__DIR__)) . '/vendor',
    'modules' => [
        'daili' => [
            'class' => \common\modules\daili\Module::className(),
        ],
        'admin' => [
            'class' => 'mdm\admin\Module',
        ], 
        'gridview' => [
            'class' => '\kartik\grid\Module',
        ],
    ],
    'components' => [
        'authManager' => [
            'class' => 'yii\rbac\PhpManager', // or use 'yii\rbac\DbManager'
        ],
        'cache' => [
            'class' => 'yii\caching\FileCache',
        ],
        'log' => [
            'targets' => [
                [
                    'class' => 'yii\log\FileTarget',
                    'levels' => ['error', 'warning'],
                    'logVars' => ['_GET', '_POST'],
                    'except' => [
                        'yii\web\Session::init',
                    ],
                    // 'logFile' => '@runtime/logs/error/' . date('Ym') . date('d') . '.log',
                    'prefix' => function ($message) {
                        return \common\log\XxyxLogger::prefix($message);
                    },
                ],
                [
                    'class' => 'yii\log\FileTarget',
                    'levels' => ['info'],
//                    'categories' => ['daili-*'],
                    'logVars' => ['_GET', '_POST'],
                    // 'logFile' => '@runtime/logs/info/' . date('Ym') . date('d') . '.log',
                    'prefix' => function ($message) {
                        return \common\log\XxyxLogger::prefix($message);
                    },
                ],
            ],
        ],
    ],
    // 'as access' => [
    //     'class' => 'mdm\admin\components\AccessControl',
    //     'allowActions' => [
    //         'site/*',
    //         'admin/*',
    //     ]
    // ],
];
